package com.xgst.callnumberscreen.activity

import com.gym.baselib.base.BaseActivity
import com.ht.medicaltreatment.R
import com.xgst.lib.utils.TimeUtils
import kotlinx.android.synthetic.main.activity_log_info_layout.*
import java.io.File

//Log日志
class LogInfoActivity: BaseActivity() {
    override fun getLayoutId() = R.layout.activity_log_info_layout

    override fun init() {
        val file = intent.getSerializableExtra("file") as File
        setTitle(file.name)
        showProgress()
        TimeUtils.countDownOneTime(1){
            file.readLines()
            val sb = StringBuffer()
            file.forEachLine {
                sb.append(it)
                sb.append("\n")
            }
            tvLogInfo.text = sb.toString()
            dismissProgress()
        }
    }

}